package com.zhentao.subscription.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

@TableName("sub_template")
public class SubscriptionTemplate {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String name; // 模版名称
    private String scopeType; // SYSTEM(系统订阅)/CUSTOMS(各关订阅)
    private String subscribeMode; // RAW/AGG
    private String dataFormat; // CSV/TXT/EXCEL/331
    private String dataSource; // 日库/月库/发布

    private String groupFields; // 汇总字段(JSON)
    private String numericAggFields; // 数值字段聚合配置(JSON)
    private String conditions; // 统计条件(JSON)
    private String selectedFields; // 字段选择(JSON)

    @TableLogic
    private Integer isDelete;

    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getScopeType() { return scopeType; }
    public void setScopeType(String scopeType) { this.scopeType = scopeType; }

    public String getSubscribeMode() { return subscribeMode; }
    public void setSubscribeMode(String subscribeMode) { this.subscribeMode = subscribeMode; }

    public String getDataFormat() { return dataFormat; }
    public void setDataFormat(String dataFormat) { this.dataFormat = dataFormat; }

    public String getDataSource() { return dataSource; }
    public void setDataSource(String dataSource) { this.dataSource = dataSource; }

    public String getGroupFields() { return groupFields; }
    public void setGroupFields(String groupFields) { this.groupFields = groupFields; }

    public String getNumericAggFields() { return numericAggFields; }
    public void setNumericAggFields(String numericAggFields) { this.numericAggFields = numericAggFields; }

    public String getConditions() { return conditions; }
    public void setConditions(String conditions) { this.conditions = conditions; }

    public String getSelectedFields() { return selectedFields; }
    public void setSelectedFields(String selectedFields) { this.selectedFields = selectedFields; }

    public Integer getIsDelete() { return isDelete; }
    public void setIsDelete(Integer isDelete) { this.isDelete = isDelete; }

    public LocalDateTime getCreatedTime() { return createdTime; }
    public void setCreatedTime(LocalDateTime createdTime) { this.createdTime = createdTime; }

    public LocalDateTime getUpdatedTime() { return updatedTime; }
    public void setUpdatedTime(LocalDateTime updatedTime) { this.updatedTime = updatedTime; }
}

